package org.springblade.modules.repair.vo;

import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springblade.modules.repair.enums.MaintainPlanContentEnum;

import java.util.Date;

/**
 * @Date 16:39 2023/4/6
 * @Description {
 *   电梯上一个工单
 * }
 * @Author lsay
 **/
@Data
public class ElevatorLastPlanVO {

	private String signImage;

	private String signOutImage;

	private Integer signTypeStatus;

	private String signTypeStatusDesc;

	private Integer signOutTypeStatus;

	private String signOutTypeStatusDesc;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date signTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date signOutTime;

	public void setSignTypeStatus(Integer signTypeStatus) {
		this.signTypeStatus = signTypeStatus;
		if(ObjectUtil.isNotEmpty(signTypeStatus)){
			this.signTypeStatusDesc = MaintainPlanContentEnum.getName(signTypeStatus);
		}
	}

	public void setSignOutTypeStatus(Integer signOutTypeStatus) {
		this.signOutTypeStatus = signOutTypeStatus;
		if(ObjectUtil.isNotEmpty(signOutTypeStatus)){
			this.signOutTypeStatusDesc = MaintainPlanContentEnum.getName(signOutTypeStatus);
		}
	}
}
